from rest_framework.permissions import IsAuthenticated

from utils.base import BasePageNumberPagination
from apps.scripts.filters import PythonScriptFilter
from apps.scripts.models import PythonScript
from apps.scripts.serializers import PythonScriptSerializers
from utils.base_view import BaseModelViewSet


class PythonScriptViewSet(BaseModelViewSet):
    serializer_class = PythonScriptSerializers
    queryset = PythonScript.objects.all()
    permission_classes = [IsAuthenticated]
    pagination_class = BasePageNumberPagination
    filterset_class = PythonScriptFilter
